<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>主页</title>
    <!-- 请勿在项目正式环境中引用该 layui.css 地址 -->
    <link href="/layui/css/layui.css" rel="stylesheet">
    <style type="text/css">
        #ID-carousel-demo-image img{
            width: 1260px;
            height: 460px;
        }
    </style>
</head>
<body>
<jsp:include page="header.jsp"></jsp:include>
<div class="layui-carousel" id="ID-carousel-demo-image" style="margin: 100px auto">
    <div carousel-item >
        <div><img src="imgs/1.jpg"></div>
        <div><img src="imgs/2.jpg"></div>
        <div><img src="imgs/3.png"></div>
        <div><img src="imgs/4.jpg"></div>
    </div>
</div>
<!-- 请勿在项目正式环境中引用该 layui.js 地址 -->
<script src="/layui/layui.js"></script>
<script>
    layui.use(function(){
        var carousel = layui.carousel;
        // 渲染 - 图片轮播
        carousel.render({
            elem: '#ID-carousel-demo-image',
            width: '1260px',
            height: '460px',
            interval: 3000   // 图片的切换时间
        });
    });
</script>
</body>
</html>